
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>iprPy.record package &#8212; iprPy 0.10.2 documentation</title>
    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="iprPy.tools package" href="tools.html" />
    <link rel="prev" title="iprPy.input package" href="input.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tools.html" title="iprPy.tools package"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="input.html" title="iprPy.input package"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">iprPy 0.10.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">iprPy package</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="iprpy-record-package">
<h1>iprPy.record package<a class="headerlink" href="#iprpy-record-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-iprPy.record">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-iprPy.record" title="Permalink to this headline">¶</a></h2>
<dl class="attribute">
<dt id="iprPy.record.loaded">
<code class="sig-name descname">loaded</code><a class="headerlink" href="#iprPy.record.loaded" title="Permalink to this definition">¶</a></dt>
<dd><p>Dictionary of the record styles that were successfully imported. The
dictionary keys are the database style names, and the values are the
loaded modules.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)">dict</a></p>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="iprPy.record.failed">
<code class="sig-name descname">failed</code><a class="headerlink" href="#iprPy.record.failed" title="Permalink to this definition">¶</a></dt>
<dd><p>Dictionary listing the record styles that failed import. Values
contain the error messages thrown by the style.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)">dict</a></p>
</dd>
</dl>
</dd></dl>

<dl class="class">
<dt id="iprPy.record.Record">
<em class="property">class </em><code class="sig-name descname">Record</code><span class="sig-paren">(</span><em class="sig-param">name=None</em>, <em class="sig-param">content=None</em><span class="sig-paren">)</span><a class="headerlink" href="#iprPy.record.Record" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Class for handling different record styles in the same fashion.  The
class defines the common methods and attributes, which are then uniquely
implemented for each style.  The available styles are loaded from the
iprPy.records submodule.</p>
<dl class="method">
<dt id="iprPy.record.Record.content">
<em class="property">property </em><code class="sig-name descname">content</code><a class="headerlink" href="#iprPy.record.Record.content" title="Permalink to this definition">¶</a></dt>
<dd><p>The record’s content.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>DataModelDict</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="iprPy.record.Record.contentroot">
<em class="property">property </em><code class="sig-name descname">contentroot</code><a class="headerlink" href="#iprPy.record.Record.contentroot" title="Permalink to this definition">¶</a></dt>
<dd><p>The root element of the content</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)">str</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="iprPy.record.Record.directory">
<em class="property">property </em><code class="sig-name descname">directory</code><a class="headerlink" href="#iprPy.record.Record.directory" title="Permalink to this definition">¶</a></dt>
<dd><p>The path to the record’s directory</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)">str</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="iprPy.record.Record.name">
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#iprPy.record.Record.name" title="Permalink to this definition">¶</a></dt>
<dd><p>The record’s name.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)">str</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="iprPy.record.Record.schema">
<em class="property">property </em><code class="sig-name descname">schema</code><a class="headerlink" href="#iprPy.record.Record.schema" title="Permalink to this definition">¶</a></dt>
<dd><p>The absolute directory path to the .xsd file associated with the
record style.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)">str</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="iprPy.record.Record.style">
<em class="property">property </em><code class="sig-name descname">style</code><a class="headerlink" href="#iprPy.record.Record.style" title="Permalink to this definition">¶</a></dt>
<dd><p>The record style</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)">str</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="iprPy.record.Record.todict">
<code class="sig-name descname">todict</code><span class="sig-paren">(</span><em class="sig-param">full=True</em>, <em class="sig-param">flat=False</em><span class="sig-paren">)</span><a class="headerlink" href="#iprPy.record.Record.todict" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts the structured content to a simpler dictionary.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>full</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag used by the calculation records.  A True value will include
terms for both the calculation’s input and results, while a value
of False will only include input terms (Default is True).</p></li>
<li><p><strong>flat</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag affecting the format of the dictionary terms.  If True, the
dictionary terms are limited to having only str, int, and float
values, which is useful for comparisons.  If False, the term
values can be of any data type, which is convenient for analysis.
(Default is False).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A dictionary representation of the record’s content.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)">dict</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="iprPy.record.load_record">
<code class="sig-name descname">load_record</code><span class="sig-paren">(</span><em class="sig-param">style</em>, <em class="sig-param">name=None</em>, <em class="sig-param">content=None</em><span class="sig-paren">)</span><a class="headerlink" href="#iprPy.record.load_record" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads a Record subclass associated with a given record style</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>style</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – The record style</p></li>
<li><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – The name to give to the specific record</p></li>
<li><p><strong>content</strong> – The record’s data model content</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A Record object for the style</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>subclass of iprPy.record.Record</p>
</dd>
</dl>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">iprPy.record package</a><ul>
<li><a class="reference internal" href="#module-iprPy.record">Module contents</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="input.html"
                        title="previous chapter">iprPy.input package</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="tools.html"
                        title="next chapter">iprPy.tools package</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tools.html" title="iprPy.tools package"
             >next</a> |</li>
        <li class="right" >
          <a href="input.html" title="iprPy.input package"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">iprPy 0.10.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >iprPy package</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2.
    </div>
  </body>
</html>